﻿using System.Windows;
using System.Windows.Media;

namespace TransControlSystem.Enum
{
    public static class StatusColor
    {
        /// <summary>
        /// 默认颜色
        /// </summary>
        /// <returns></returns>
        public static LinearGradientBrush Default()
        {
            LinearGradientBrush myLinearGradientBrush = new LinearGradientBrush();
            myLinearGradientBrush.StartPoint = new Point(0, 0);
            myLinearGradientBrush.EndPoint = new Point(0, 1);
            myLinearGradientBrush.GradientStops.Add(new GradientStop(Color.FromRgb(255, 255, 255), 0.0));
            myLinearGradientBrush.GradientStops.Add(new GradientStop(Color.FromRgb(255, 255, 255), 1.0));
            return myLinearGradientBrush;
        }
        /// <summary>
        /// 有料时触发算法
        /// </summary>
        /// <returns></returns>
        public static LinearGradientBrush TriggeredAlgorithmFull()
        {
            LinearGradientBrush myLinearGradientBrush = new LinearGradientBrush();
            myLinearGradientBrush.StartPoint = new Point(0, 0);
            myLinearGradientBrush.EndPoint = new Point(0, 1);
            myLinearGradientBrush.GradientStops.Add(new GradientStop(Color.FromRgb(0, 194, 87), 0.0));
            //myLinearGradientBrush.GradientStops.Add(new GradientStop(Color.FromRgb(100, 233, 100), 0.5));
            myLinearGradientBrush.GradientStops.Add(new GradientStop(Color.FromRgb(0, 194, 87), 1.0));
            return myLinearGradientBrush;
        }
        /// <summary>
        /// 无料时触发算法
        /// </summary>
        /// <returns></returns>
        public static LinearGradientBrush TriggeredAlgorithmEmpty()
        {
            LinearGradientBrush myLinearGradientBrush = new LinearGradientBrush();
            myLinearGradientBrush.StartPoint = new Point(0, 0);
            myLinearGradientBrush.EndPoint = new Point(0, 1);
            myLinearGradientBrush.GradientStops.Add(new GradientStop(Color.FromRgb(246, 211, 182), 0.0));
            //myLinearGradientBrush.GradientStops.Add(new GradientStop(Color.FromRgb(255, 255, 0), 0.5));
            myLinearGradientBrush.GradientStops.Add(new GradientStop(Color.FromRgb(246, 211, 182), 1.0));
            return myLinearGradientBrush;
        }
        /// <summary>
        /// 有料未触发算法
        /// </summary>
        /// <returns></returns>
        public static LinearGradientBrush NoAlgorithmFull()
        {
            LinearGradientBrush myLinearGradientBrush = new LinearGradientBrush();
            myLinearGradientBrush.StartPoint = new Point(0, 0);
            myLinearGradientBrush.EndPoint = new Point(0, 1);
            myLinearGradientBrush.GradientStops.Add(new GradientStop(Color.FromRgb(176, 225, 117), 0.0));
            //myLinearGradientBrush.GradientStops.Add(new GradientStop(Color.FromRgb(192, 255, 62), 0.5));
            myLinearGradientBrush.GradientStops.Add(new GradientStop(Color.FromRgb(176, 225, 117), 1.0));
            return myLinearGradientBrush;
        }

        /// <summary>
        /// 无料未触发算法
        /// </summary>
        /// <returns></returns>
        public static LinearGradientBrush NoAlgorithmEmpty()
        {
            LinearGradientBrush myLinearGradientBrush = new LinearGradientBrush();
            myLinearGradientBrush.StartPoint = new Point(0, 0);
            myLinearGradientBrush.EndPoint = new Point(0, 1);
            myLinearGradientBrush.GradientStops.Add(new GradientStop(Color.FromRgb(171, 242, 239), 0.0));
            //myLinearGradientBrush.GradientStops.Add(new GradientStop(Color.FromRgb(210, 180, 140), 0.5));
            myLinearGradientBrush.GradientStops.Add(new GradientStop(Color.FromRgb(171, 242, 239), 1.0));
            return myLinearGradientBrush;
        }

        /// <summary>
        /// 锁定
        /// </summary>
        /// <returns></returns>
        public static LinearGradientBrush Lock()
        {
            LinearGradientBrush myLinearGradientBrush = new LinearGradientBrush();
            myLinearGradientBrush.StartPoint = new Point(0, 0);
            myLinearGradientBrush.EndPoint = new Point(0, 1);
            myLinearGradientBrush.GradientStops.Add(new GradientStop(Color.FromRgb(185, 185, 185), 0.0));
            myLinearGradientBrush.GradientStops.Add(new GradientStop(Color.FromRgb(185, 185, 185), 1.0));
            return myLinearGradientBrush;
        }
    }
}
